package com.niezhipeng.utils;

import com.rabbitmq.client.ConnectionFactory;

/**
 * @author Nie ZhiPeng
 */
public class ConnectFactoryUtils {
    /**
     * 设置连接参数，分别是：主机名、端口号、vhost、用户名、密码
     * @param factory
     */
    public static void setFactoryConfig(ConnectionFactory factory){
        factory.setHost("120.25.217.13");
        // 下面这些都是默认值，不设置也可以
        factory.setPort(5672);
        factory.setVirtualHost("/");
        factory.setUsername("guest");
        factory.setPassword("guest");
    }
}
